package com.yj.ccs.abs.web.asset.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yj.ccs.abs.boot.pagination.PageDto;
import com.yj.ccs.abs.common.enums.AssetListType;
import com.yj.ccs.abs.common.enums.AssetStatusType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.time.LocalDate;

/**
 * Copyright 2018 (C) Yunjian-VC
 * Created on : 2018/3/22
 * Author     : Unbelievable9
 **/
@Data
public class AssetListDto extends PageDto {

    @NotNull(message = "列表类型不能为空")
    @ApiModelProperty(value = "列表类型<br>1-普通<br>2-当期<br>3-记录", required = true, example = "NORMAL")
    private AssetListType list_type;

    @NotNull(message = "资产状态不能为空")
    @ApiModelProperty(value = "资产状态<br>1-待提交入池<br>2-待审核入池<br>3-已入池<br>4-待赎回<br>5-待回购<br>6-已回收", required = true, example = "WAIT_TO_APPLY")
    private AssetStatusType asset_status;

    @ApiModelProperty("搜索关键字")
    private String keyword;

    @ApiModelProperty("债务人")
    private String debtor;

    @ApiModelProperty("债权人")
    private String creditor;

    @ApiModelProperty(value = "应收账款分级<br>1-正常<br>2-逾期<br>3-关注<br>4-次级<br>5-违约", example = "NORMAL")
    private Integer level = 1;

    @ApiModelProperty(value = "是否结算 0-未结算 1-已结算 2-无", example = "0")
    private Integer settled = 0;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty(value = "期间开始时间")
    private LocalDate start_date;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty(value = "期间结束时间")
    private LocalDate end_date;
}
